﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Scoot.Services
{
	public interface IService<TModel, TKey>
	{
		ServiceResult Create(TModel model);

		ServiceResult Edit(TKey id, TModel model);

		ServiceResult Retire(TKey id);

		TModel GetByID(TKey id);

		/// <summary>
		/// Find members matching the properties in <paramref name="criteria"/>.
		/// </summary>
		/// <param name="criteria"></param>
		/// <returns></returns>
		IList<TModel> Find(Expression<Func<TModel, bool>> predicate);
	}
}
